* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Handle $'
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 3 Apr 2014 00:41:09 +0000 (20:41 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 3 Apr 2014 00:41:09 +0000 (20:41 -0400)
used as a variable.

lisp/ChangeLog
lisp/progmodes/perl-mode.el
src/ChangeLog
test/indent/perl.perl

index 348de7e919e973144c0ce6a172c201a63f57ccfa..80fd908943b2c7fb2462eec89a3b79a141ca15d9 100644 (file)
@@ -1,3 +1,8 @@
+2014-04-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/perl-mode.el (perl-syntax-propertize-function): Handle $'
+       used as a variable (bug#17174).
+
 2014-04-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/perl-mode.el (perl-indent-new-calculate):
index cf9347d0e6d1e238679431128362cbf6efd72f8e..3486c0a19838a16f60eace2fd16ac1edd8fe482a 100644 (file)
       ;; Catch ${ so that ${var} doesn't screw up indentation.
       ;; This also catches $' to handle 'foo$', although it should really
       ;; check that it occurs inside a '..' string.
-      ("\\(\\$\\)[{']" (1 ". p"))
+      ("\\(\\$\\)[{']" (1 (unless (and (eq ?\' (char-after (match-end 1)))
+                                       (save-excursion
+                                         (not (nth 3 (syntax-ppss
+                                                      (match-beginning 0))))))
+                            (string-to-syntax ". p"))))
       ;; Handle funny names like $DB'stop.
       ("\\$ ?{?^?[_[:alpha:]][_[:alnum:]]*\\('\\)[_[:alpha:]]" (1 "_"))
       ;; format statements
index 1a88a63b32704e928a3282846189a93a136eadec..7335f532fffbc1421388a0109cbea4f00a6c1ace 100644 (file)
        * frame.c (delete_frame): Block/unblock input to overcome race
        condition (Bug#15475).
 
-2013-09-29  Andreas Politz  <politza@hochschule-trier.de>  (tiny change)
+2013-09-29  Andreas Politz  <politza@hochschule-trier.de>
 
        * frame.c (delete_frame): Record selected frame only after
        calling Qdelete_frame_functions (Bug#15477).
index 69c1f90c807a07de185664b77250e3b84bba179c..7cb877b0a95d64d80f567f9d7b60df17c599c289 100755 (executable)
@@ -16,5 +16,9 @@ EOF1
 bar
 EOF2
 
+print $'; # This should not start a string!
+
+print "hello" for /./;
+
 $fileType_filesButNot           # bug#12373?
     = join( '|', map { quotemeta($_).'$' } @{$fileType->{filesButNot}} );